<template>
  <div class="home">
    <div>
      我叫{{$store.state.name}},
      来自{{$store.state.msg}},
      今年{{$store.state.age}},
      体重{{$store.getters.changeGettersFn}},
      兴趣爱好：{{$store.state.hobby}}
      <br>
      <button @click="$store.commit('changeName','小红')">修改名字</button>
      <button @click="$store.dispatch('changeAge',10)">异步修改年龄+10</button>
      <button @click="$store.commit('changeGetters',3)">getters 修改体重+10</button>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src

export default {
  name: 'Home',
  components: {
  },

}
</script>
